<?php

namespace App\Http\Resources\Backend;

use Illuminate\Http\Resources\Json\Resource;

/**
 * Class SchoolAdminLogResource
 * @package App\Http\Resources\Backend
 */
class SchoolAdminLogResource extends Resource
{
    /**
     * @param \Illuminate\Http\Request $request
     * @return array
     */
    public function toArray($request)
    {
        return [
            'id' => $this->id,
            'school_admin' => new SchoolAdminResource($this->whenLoaded('schoolAdmin')),
            'message' => $this->message,
            'action_ip' => $this->action_ip,
            'user_agent' => $this->user_agent,
            'action_time' => $this->action_time,
        ];
    }
}
